package com.ecc.auth.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.ecc.auth.pojo.SysUserDO;
import com.github.pagehelper.Page;

@Mapper
public interface UserMapper {
	
    /**
    *
    * @mbggenerated 2018-06-12
    */
   int deleteByPrimaryKey(Long id);

   /**
    *
    * @mbggenerated 2018-06-12
    */
   int insert(SysUserDO record);

   /**
    *
    * @mbggenerated 2018-06-12
    */
   int insertSelective(SysUserDO record);

   /**
    *
    * @mbggenerated 2018-06-12
    */
   SysUserDO selectByPrimaryKey(Long id);

   /**
    *
    * @mbggenerated 2018-06-12
    */
   int updateByPrimaryKeySelective(SysUserDO record);

   /**
    *
    * @mbggenerated 2018-06-12
    */
   int updateByPrimaryKey(SysUserDO record);

   
   
   List<SysUserDO> list(Map<String,Object> param);
	

	@Delete("<script>"+ 
			"delete from sys_user where user_id in "+
			"<foreach collection=\"list\" index=\"i\" open=\"(\" separator=\",\" close=\")\" item=\"item\"  >#{item}</foreach>"+
			"</script>")
	int batchRemove(List<Long> list);

	SysUserDO queryUserByLoginName(String username);
}
